<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
	<script>
		{
			let a = 10;
			var b = 2;
		}
		//console.log(a);
		console.log(b);

		//for循环的计数器，就很合适使用let命令。
		for (var i = 0; i < 10; i++) {
			// ...
		}
		console.log(i);// ReferenceError: i is not defined


		const i = 3;
	</script>

</body>
</html>